package com.stylefeng.guns.core.util;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 员工码的生成号
 * @author Administrator
 *
 */
public class InitWarehouseID {

	private static InitWarehouseID instance  = new InitWarehouseID();
	
	
	//获取唯一可用的对象
	   public static InitWarehouseID getInstance(){
	      return instance;
	   }
	   
	private InitWarehouseID(){}
	
	//生成
	public  String initDisorderID(){
		String number = (int)((Math.random()*9+1)*1000) +"";
		Date now = new Date();
		DateFormat format = new SimpleDateFormat("yyyyMMdd");
		String dateStr = format.format(now);
		return  "Wa"+dateStr+number;
	}
}
